﻿<!DOCTYPE HTML>
<%@page contentType="text/html; charset=UTF-8" language="java" %>
<% String path = request.getContextPath(); %>
<html>
<head>
<script id="allmobilize" charset="utf-8" src="static/web/js/allmobilize.min.js"></script>
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="alternate" media="handheld"  />
<!-- end 云适配 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>注册-拉勾网-最专业的互联网招聘平台</title>
<meta property="qc:admins" content="23635710066417756375" />
<meta content="拉勾网是3W旗下的互联网领域垂直招聘网站,互联网职业机会尽在拉勾网" name="description">
<meta content="拉勾,拉勾网,拉勾招聘,拉钩, 拉钩网 ,互联网招聘,拉勾互联网招聘, 移动互联网招聘, 垂直互联网招聘, 微信招聘, 微博招聘, 拉勾官网, 拉勾百科,跳槽, 高薪职位, 互联网圈子, IT招聘, 职场招聘, 猎头招聘,O2O招聘, LBS招聘, 社交招聘, 校园招聘, 校招,社会招聘,社招" name="keywords">

<meta name="baidu-site-verification" content="QIQ6KC1oZ6" />

<!-- <div class="web_root"  style="display:none">h</div> -->
<script type="text/javascript">
var ctx = "h";
console.log(1);
</script>
<link rel="Shortcut Icon" href="h/images/favicon.ico">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/web/css/style.css"/>

<script src="${pageContext.request.contextPath}/static/web/js/jquery.1.10.1.min.js" type="text/javascript"></script>

<script type="text/javascript" src="${pageContext.request.contextPath}/static/web/js/jquery.lib.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/web/js/core.min.js"></script>
	<script type="text/javascript" src="<%=path%>/static/js/jquery.cookie.js"></script>


<script type="text/javascript">
var youdao_conv_id = 271546; 
</script> 
<script type="text/javascript" src="${pageContext.request.contextPath}/static/web/js/conv.js"></script>
</head>

<body id="login_bg">

	<div class="login_wrapper">
		<div class="login_header">
        	<a href="h/"><img src="${pageContext.request.contextPath}/static/web/images/logo_white.png" width="285" height="62" alt="拉勾招聘" /></a>
            <div id="cloud_s"><img src="${pageContext.request.contextPath}/static/web/images/cloud_s.png" width="81" height="52" alt="cloud" /></div>
            <div id="cloud_m"><img src="${pageContext.request.contextPath}/static/web/images/cloud_m.png" width="136" height="95"  alt="cloud" /></div>
        </div>
        
    	<input type="hidden" id="resubmitToken" value="9b207beb1e014a93bc852b7ba450db27" />		
		<div class="login_box">
        	<form id="loginForm" class="myfrom" method="post" action="${pageContext.request.contextPath}/zhuang/register">
        		<ul class="register_radio clearfix">
		            <li>
		            	找工作
		              	<input type="radio" id="work"  />
						<input  hidden  id="ck" name="work">
		            </li>
		            <li>
		           	           招人
		              	<input type="radio" id="recruit"   />
		            </li>
		        </ul>
				<span></span>
            	<input type="text" id="email" name="email" tabindex="1" placeholder="请输入常用邮箱地址" />
				<input type="text" name="identify" id="identify" placeholder="验证码"  value="">
				<input type="button" id="checkCode" class="checkCode" name="code"   tabindex="1" value="获取验证码" />
                <span class="error" style="display:none;" id="beError"></span>
                <input  type="text" id="username" name="username" tabindex="2" placeholder="请输入用户名" />
				<span></span>
				<input type="password" id="password1" placeholder="请输入密码" tabindex="3">
				<span></span>
				<input type="password"id="password" name="passowrd" placeholder="请确认输入密码" tabindex="3">
				<span></span>
            	<label class="fl registerJianJu" for="checkbox">
            		<input type="checkbox" id="checkbox" name="checkbox"   class="checkbox valid" />我已阅读并同意<a href="h/privacy.html" target="_blank">《拉勾用户协议》</a>
           		</label>
                <input type="submit" id="submitLogin" class="Butsubmit" value="注 &nbsp; &nbsp; 册" />

                
                <input type="hidden" id="callback" name="callback" value=""/>
                <input type="hidden" id="authType" name="authType" value=""/>
                <input type="hidden" id="signature" name="signature" value=""/>
                <input type="hidden" id="timestamp" name="timestamp" value=""/>
            </form>
            <div class="login_right">
            	<div>已有拉勾帐号</div>
            	<a href="<%=path%>/zhuang/login" class="registor_now">直接登录</a>
                <div class="login_others">使用以下帐号直接登录:</div>
                <a  href="h/ologin/auth/sina.html"  target="_blank" class="icon_wb" title="使用新浪微博帐号登录"></a>
               	<a  href="h/ologin/auth/qq.html"  class="icon_qq" target="_blank" title="使用腾讯QQ帐号登录" ></a>
            </div>
        </div>
        <div class="login_box_btm"></div>
    </div>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery-3.5.1.min.js"></script>
    <script type="text/javascript">
		var path="${pageContext.request.contextPath}"
		$(function () {
			$("#email").blur(checkEmail);
			$("#password1").blur(checkUserpass1);
			$("#password").blur(checkUserpass2);
			$("#recruit").click(recruitClick);
			$("#work").click(workClick);
			$("#submitLogin").click(function () {
				 if(!checkUserpass2())return false;
				 if(!checkbox())return false;
				$("#loginForm").submit(function () {
					return checkEmail()&&checkUsername()||checkUsername1();
				});

			});
			var wait=60;
			function time(o) {
				if (wait == 0) {
					o.removeAttribute("disabled");
					o.value="免费获取验证码";
					wait = 60;
				} else {
					o.setAttribute("disabled", true);
					o.value="重新发送(" + wait + ")";
					wait--;
					setTimeout(function() {
								time(o)
							},
							1000)
				}
			}


			$("#checkCode").click(function(){

				//发送验证码
				var email = $("#email").val();
				if(email==""){
					return;
				}
				alert("验证码已发送，请及时查看你的邮箱");
				time(this);
				$(".code").toggle();
				//ajax实现后台邮箱的发送
				$.ajax({
					//url路径
					url: path+"/zhuang/sendEmail",
					//data请求数据
					data: {"email":email},
					//dataType json
					type: "post",
					//回调函数
					success: function (data) {
						//回调函数 data 返回流
						if (data == "failure") {
							alert("发送失败");
						}
						else if (data=="false"){
							alert("目标邮箱不存在，请检查你的邮箱是否正确");
						}
						//  else{

						// }
					}
				});
			});





		});

       function checkbox() {
       	if($("#checkbox").prop("checked")==true){
       		return true;
		}
       	else {
       		return false;
		}

	   }

		function workClick() {
			$("#username").blur(checkUsername);
			$("#ck").val(1);
			//$("#recruit").val(0);

		}
		function  recruitClick() {
			$("#username").blur(checkUsername1);
			//$("#recruit").val(1);
			$("#ck").val(0);



		}
		//验证公司用户名
		function checkUsername1() {
			var username=$("#username").val();

			var reg=/^\w{5,15}$/;
			var flag=reg.test(username);

			if(flag){
				$.ajax({
					url:path+"/zhuang/checkCompanyUsername",
					type:"post",
					async:false,
					data:{"username":username},
					success:function (mes) {
						if(mes=="1"){
							$("#username").next().html("用户名存在");
							$("#username").next().css("color","red");
							flag = false;
						}
						if(mes=="0"){
							$("#username").next().html("√");
							$("#username").next().css("color","green");
							flag = true;
						}


					}
				});
				return  flag;
			}
			else{
				$("#username").next().html("用户名含有非法字符或者是用户名不是5-15个合法字符");
				$("#username").next().css("color","red");
				alert("用户名含有非法字符或者是用户名不是5-15个合法字符");
				return false;
			}

		}
		function checkUserpass2() {
			var password1=$("#password1").val();
			var password=$("#password").val();
             var  flag;
			if(password1==password){
				$("#password").next().html("√");
				$("#password").next().css("color","green");
				flag =true;
			}
			if(password1!=password){
				$("#password").next().html("两次输入的密码不一致，请重新输入");
				$("#password").next().css("color","red");
				flag=false;
			}
			return flag;


		}
		function  checkUserpass1() {
			var userpass=$("#password1").val();
			var flag = false;
			if(userpass.length==0){
				$("#password1").next().html("密码不能为空");
				$("#password1").next().css("color","red");
			}
			else{
				$("#password1").next().html("√");
				$("#password1").next().css("color","green");
				falg = true;
			}
			return flag;

		}
		//验证个人用户名
		function checkUsername() {
			var username=$("#username").val();

			var reg=/^\w{5,15}$/;
			var flag=reg.test(username);

			if(flag){
				$.ajax({
					url:path+"/zhuang/checkUsername",
					type:"post",
					async:false,
					data:{"username":username},
					success:function (mes) {
						if(mes=="1"){
							$("#username").next().html("用户名存在");
							$("#username").next().css("color","red");
							flag = false;
						}
						if(mes=="0"){
							$("#username").next().html("√");
							$("#username").next().css("color","green");
							flag = true;
						}


					}
				});
				return flag;
			}
			else{
				$("#username").next().html("用户名含有非法字符或者是用户名不是5-15个合法字符");
				$("#username").next().css("color","red");
				alert("用户名含有非法字符或者是用户名不是5-15个合法字符");
				return false;
			}

		}
		//验证邮箱格式是否正确
		function checkEmail(){

			var email=$("#email").val();
			var reg=/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
			var flag=reg.test(email);
			if(!flag){
				$("#email").prev().html("邮箱格式不正确");
				$("#email").prev().css("color","red");
				return false;
			}
			else {
				$("#email").prev().html("邮箱正确");
				$("#email").prev().css("color","green");
				return true;
			}
			return flag;

		}

    
    $(document).ready(function(e) {
    	$('.register_radio li input').click(function(e){
    		$(this).parent('li').addClass('current').append('<em></em>').siblings().removeClass('current').find('em').remove();
    	});

    	$('#email').focus(function(){
    		$('#beError').hide();
    	});
    });

    </script>
</body>
</html>
